Conversation
Add install.sh that automates the Quick Start installation process: - Creates required directories (~/.claude/skills, ~/.claude/agents, etc.) - Installs Claude Code and Cursor personal skills and subagents - Optionally installs personal CLAUDE.md - Works both locally and via curl pipe to bash Update README.md with curl one-liner for easy installation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When running via curl | bash, stdin is not a TTY so the read prompt doesn't work. Now detects non-interactive mode and shows a curl command users can run to manually install CLAUDE.md. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CLAUDE.md is now installed automatically (not optional) - If file exists: prompt to overwrite in interactive mode, skip in non-interactive - Simplifies the curl one-liner experience Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds a new Bash installer ( Changes
Sequence DiagramsequenceDiagram
participant User
participant Installer as install.sh
participant Repo as Repository
participant FS as File\ System
User->>Installer: Run installer (curl|bash or local)
Installer->>FS: Check for local source dirs (claude_personal_skills...)
alt source present
Installer->>FS: Set SOURCE_DIR = local repo
else source absent
Installer->>Repo: git clone to temp dir
Repo-->>Installer: cloned repo
Installer->>FS: Set SOURCE_DIR = temp clone
end
Installer->>FS: Create target dirs (~/.claude, ~/.cursor, subdirs)
Installer->>FS: Copy SOURCE_DIR/claude_personal_skills/* -> ~/.claude/skills/
Installer->>FS: Copy SOURCE_DIR/claude_subagents/* -> ~/.claude/agents/
Installer->>FS: Copy SOURCE_DIR/cursor_personal_skills/* -> ~/.cursor/skills-cursor/
Installer->>FS: Copy SOURCE_DIR/cursor_subagents/* -> ~/.cursor/agents/
Installer->>FS: Check ~/.claude/CLAUDE.md
alt CLAUDE.md missing
Installer->>FS: Install CLAUDE.md
else CLAUDE.md exists
Installer->>User: Prompt to overwrite (interactive) or skip (non-interactive)
end
Installer->>User: Print summary and next steps
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 36-37: The trap currently expands TEMP_DIR at definition time and
leaves it unquoted; change the trap to avoid early expansion and quote the
variable by replacing trap "rm -rf $TEMP_DIR" EXIT with a single-quoted/trapped
command that quotes the variable, e.g. use trap 'rm -rf "$TEMP_DIR"' EXIT so
mktemp -d output is removed safely even if it contains spaces (addresses SC2064
and unquoted variable risk); locate the TEMP_DIR assignment and the trap
invocation to apply this change.
- Around line 28-33: SCRIPT_DIR detection is unreliable when the script is piped
via curl because BASH_SOURCE[0] can be empty and dirname "" resolves to ".",
causing false positives for CLAUDE.md; update the logic that sets SCRIPT_DIR and
SOURCE_DIR (symbols: SCRIPT_DIR, BASH_SOURCE, SOURCE_DIR, CLAUDE.md) to first
detect piped stdin (e.g., test if stdin is not a TTY or if BASH_SOURCE is empty)
and only treat the repo-as-local when BASH_SOURCE points to an actual file and a
stronger repo marker exists (e.g., a skills/ directory or .git), otherwise fall
back to cloning/remote install path; ensure the info log still runs when truly
local but avoid using CWD as SOURCE_DIR when BASH_SOURCE is unset.
🧹 Nitpick comments (1)
README.md (1)
21-34: Consider adding a note about reviewing the script before piping to bash.The
curl | bashpattern is standard for developer tools, but security-conscious users appreciate the option to inspect first. A brief note would be a nice addition.Suggested addition
curl -fsSL https://raw.githubusercontent.com/meleantonio/ChernyCode/main/install.sh | bash
+> Tip: To review the script before running, download it first with
curl -fsSL … -o install.sh, inspect it, then runbash install.sh.</details> </blockquote></details> </blockquote></details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
- Check BASH_SOURCE[0] is set and verify claude_personal_skills dir exists to avoid false-positive local-repo detection when piped via curl | bash - Use single-quoted trap to properly handle paths with spaces (SC2064) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@install.sh`:
- Around line 34-42: Add a pre-check for the git binary and stop suppressing git
clone diagnostics: before using TEMP_DIR and running git clone, verify git is
available (e.g. check command -v git or which git) and call error with a clear
message like "git is required, please install git" if missing; remove the
redirection "2>/dev/null" from the git clone invocation so clone failures
surface real diagnostics (authentication/DNS/permission errors) and keep the
existing fallback that calls error "Failed to clone repository. Check your
internet connection." to preserve behavior when clone actually fails.
- Around line 124-125: Before calling cp, ensure the source file exists: add a
test for [[ -f "$SOURCE_DIR/CLAUDE.md" ]] and only run cp
"$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md when that check passes; if the file
is missing, emit a clear message (using echo or logger) indicating
SOURCE_DIR/CLAUDE.md was not found and either skip the copy or exit with a
helpful error. Reference the variables/commands SOURCE_DIR, CLAUDE.md, and cp to
locate the exact spot to change.
🧹 Nitpick comments (1)
install.sh (1)
61-119: Consider extracting a helper to reduce the repeated install pattern.All four install blocks (Claude skills, Claude agents, Cursor skills, Cursor agents) follow the same structure: check source dir exists → iterate entries → copy → log. A small helper function would cut the duplication.
Example helper
install_assets() { local label="$1" src_dir="$2" dest_dir="$3" pattern="$4" info "Installing $label..." if [[ ! -d "$src_dir" ]]; then warn " No $label found"; return fi for item in "$src_dir"/$pattern; do [[ -e "$item" ]] || continue cp -r "${item%/}" "$dest_dir/" success " Installed: $(basename "$item")" done } install_assets "Claude Code personal skills" "$SOURCE_DIR/claude_personal_skills" ~/.claude/skills "*/" install_assets "Claude Code subagents" "$SOURCE_DIR/claude_subagents" ~/.claude/agents "*.md" install_assets "Cursor personal skills" "$SOURCE_DIR/cursor_personal_skills" ~/.cursor/skills-cursor "*/" install_assets "Cursor subagents" "$SOURCE_DIR/cursor_subagents" ~/.cursor/agents "*.md"
| else | ||
| # Running via curl - clone to temp directory | ||
| TEMP_DIR=$(mktemp -d) | ||
| trap 'rm -rf "$TEMP_DIR"' EXIT | ||
| info "Cloning ChernyCode repository..." | ||
| git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \ | ||
| error "Failed to clone repository. Check your internet connection." | ||
| SOURCE_DIR="$TEMP_DIR" | ||
| success "Repository cloned" |
There was a problem hiding this comment.
Missing git prerequisite check and suppressed clone diagnostics.
When run via curl | bash, git might not be installed. The 2>/dev/null on git clone swallows all diagnostic output, so the user only sees "Check your internet connection" even if the real problem is a missing git binary, an auth error, or a DNS issue.
Proposed fix
# Running via curl - clone to temp directory
+ command -v git >/dev/null 2>&1 || error "git is not installed. Please install git first."
TEMP_DIR=$(mktemp -d)
trap 'rm -rf "$TEMP_DIR"' EXIT
info "Cloning ChernyCode repository..."
- git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \
+ git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" || \
error "Failed to clone repository. Check your internet connection."📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| else | |
| # Running via curl - clone to temp directory | |
| TEMP_DIR=$(mktemp -d) | |
| trap 'rm -rf "$TEMP_DIR"' EXIT | |
| info "Cloning ChernyCode repository..." | |
| git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" 2>/dev/null || \ | |
| error "Failed to clone repository. Check your internet connection." | |
| SOURCE_DIR="$TEMP_DIR" | |
| success "Repository cloned" | |
| else | |
| # Running via curl - clone to temp directory | |
| command -v git >/dev/null 2>&1 || error "git is not installed. Please install git first." | |
| TEMP_DIR=$(mktemp -d) | |
| trap 'rm -rf "$TEMP_DIR"' EXIT | |
| info "Cloning ChernyCode repository..." | |
| git clone --depth 1 https://github.com/meleantonio/ChernyCode.git "$TEMP_DIR" || \ | |
| error "Failed to clone repository. Check your internet connection." | |
| SOURCE_DIR="$TEMP_DIR" | |
| success "Repository cloned" |
🤖 Prompt for AI Agents
In `@install.sh` around lines 34 - 42, Add a pre-check for the git binary and stop
suppressing git clone diagnostics: before using TEMP_DIR and running git clone,
verify git is available (e.g. check command -v git or which git) and call error
with a clear message like "git is required, please install git" if missing;
remove the redirection "2>/dev/null" from the git clone invocation so clone
failures surface real diagnostics (authentication/DNS/permission errors) and
keep the existing fallback that calls error "Failed to clone repository. Check
your internet connection." to preserve behavior when clone actually fails.
| if [[ ! -f ~/.claude/CLAUDE.md ]]; then | ||
| cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md |
There was a problem hiding this comment.
No guard that CLAUDE.md exists in the source before copying.
If SOURCE_DIR/CLAUDE.md is absent (e.g., the file was renamed or the shallow clone was partial), cp fails and set -e aborts with an unhelpful message. A pre-check would improve the experience.
Proposed fix
if [[ ! -f ~/.claude/CLAUDE.md ]]; then
- cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md
- success "Personal CLAUDE.md installed"
- info "Edit ~/.claude/CLAUDE.md to customize your preferences"
+ if [[ -f "$SOURCE_DIR/CLAUDE.md" ]]; then
+ cp "$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md
+ success "Personal CLAUDE.md installed"
+ info "Edit ~/.claude/CLAUDE.md to customize your preferences"
+ else
+ warn "CLAUDE.md not found in source, skipping"
+ fi
else🤖 Prompt for AI Agents
In `@install.sh` around lines 124 - 125, Before calling cp, ensure the source file
exists: add a test for [[ -f "$SOURCE_DIR/CLAUDE.md" ]] and only run cp
"$SOURCE_DIR/CLAUDE.md" ~/.claude/CLAUDE.md when that check passes; if the file
is missing, emit a clear message (using echo or logger) indicating
SOURCE_DIR/CLAUDE.md was not found and either skip the copy or exit with a
helpful error. Reference the variables/commands SOURCE_DIR, CLAUDE.md, and cp to
locate the exact spot to change.
Summary
install.shscript that automates the Quick Start installation processREADME.mdwith curl one-liner for easy installationChanges
install.sh: New installation script that:
~/.claude/skills,~/.claude/agents, etc.)./install.sh) and via curl (curl ... | bash)README.md: Added "One-Line Install" section with curl command
Test plan
./install.shlocally - verified files install to correct locationscurl -fsSL .../install.sh | bash- installs everything including CLAUDE.md🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation